ok, I promise, last commit tonight... TV time! - This is just a quick cleanup, and make libopm use marks string functions
This commit is contained in:
parent
4a8dbddf92
commit
47a68518dd
5 changed files with 7 additions and 1083 deletions
2
.gitattributes
vendored
2
.gitattributes
vendored
|
@ -29,8 +29,6 @@ libopm/opm_error.h -text
|
|||
libopm/opm_types.h -text
|
||||
libopm/proxy.c -text
|
||||
libopm/proxy.h -text
|
||||
libopm/snprintf.c -text
|
||||
libopm/snprintf.h -text
|
||||
libopm/test.c -text
|
||||
/modconfig.h.in -text
|
||||
/opsb.Settings -text
|
||||
|
|
|
@ -13,12 +13,12 @@ extern int libopm_inet_aton(const char *cp, struct in_addr *inp);
|
|||
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#undef snprintf
|
||||
#define snprintf libopm_snprintf
|
||||
#define snprintf ircsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#undef vsnprintf
|
||||
#define vsnprintf libopm_vsnprintf
|
||||
#define vsnprintf ircvsnprintf
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_INET_PTON
|
||||
|
|
1031
libopm/snprintf.c
1031
libopm/snprintf.c
File diff suppressed because it is too large
Load diff
|
@ -1,34 +0,0 @@
|
|||
#ifndef _PORTABLE_SNPRINTF_H_
|
||||
#define _PORTABLE_SNPRINTF_H_
|
||||
#include <stddef.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#define PORTABLE_SNPRINTF_VERSION_MAJOR 2
|
||||
#define PORTABLE_SNPRINTF_VERSION_MINOR 2
|
||||
|
||||
#ifdef HAVE_SNPRINTF
|
||||
#include <stdio.h>
|
||||
#else
|
||||
extern int libopm_snprintf(char *, size_t, const char *, /*args*/ ...);
|
||||
extern int libopm_vsnprintf(char *, size_t, const char *, va_list);
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
#define snprintf libopm_snprintf
|
||||
#define vsnprintf libopm_vsnprintf
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SNPRINTF) && defined(PREFER_PORTABLE_SNPRINTF)
|
||||
extern int portable_snprintf(char *str, size_t str_m, const char *fmt, /*args*/ ...);
|
||||
extern int portable_vsnprintf(char *str, size_t str_m, const char *fmt, va_list ap);
|
||||
#undef snprintf
|
||||
#undef vsnprintf
|
||||
#define snprintf portable_snprintf
|
||||
#define vsnprintf portable_vsnprintf
|
||||
#endif
|
||||
|
||||
extern int asprintf (char **ptr, const char *fmt, /*args*/ ...);
|
||||
extern int vasprintf (char **ptr, const char *fmt, va_list ap);
|
||||
extern int asnprintf (char **ptr, size_t str_m, const char *fmt, /*args*/ ...);
|
||||
extern int vasnprintf(char **ptr, size_t str_m, const char *fmt, va_list ap);
|
||||
|
||||
#endif
|
19
proxy.c
19
proxy.c
|
@ -244,23 +244,14 @@ void scan_error(OPM_T *scanner, OPM_REMOTE_T *remote, int opmerr, void *unused)
|
|||
scaninfo *scandata;
|
||||
|
||||
SET_SEGV_LOCATION();
|
||||
#if 0
|
||||
/* don't delete if the opm lookup hasn't completed yet */
|
||||
if ((scandata->dnsstate == DO_OPM_LOOKUP) || (scandata->dnsstate == GET_NICK_IP))
|
||||
break;
|
||||
|
||||
if (scandata->dnsstate == OPMLIST) savescan = 0;
|
||||
/* if this is not valid, exit (ie, the scan hasn't started yet) */
|
||||
if (scandata->socks == NULL) {
|
||||
nlog(LOG_CRITICAL, LOG_MOD, "Ehhh, socks for %s is NULL? WTF?", scandata->who);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
scandata = remote->data;
|
||||
if (scandata->u) {
|
||||
prefmsg(scandata->u->nick, s_opsb, "scan error on Protocol %s (%d) - %d", type_of_proxy(remote->protocol), remote->port, opmerr);
|
||||
if (opmerr == 5) {
|
||||
prefmsg(scandata->u->nick, s_opsb, "Closed Proxy on Protocol %s (%d)", type_of_proxy(remote->protocol), remote->port);
|
||||
} else {
|
||||
prefmsg(scandata->u->nick, s_opsb, "scan error on Protocol %s (%d) - %d", type_of_proxy(remote->protocol), remote->port, opmerr);
|
||||
}
|
||||
}
|
||||
/*XXX cleanup */
|
||||
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue