}
-int ClientGetLine(int *sock, StrBuf *Target, StrBuf *CLineBuf)
+int ClientGetLine(int *sock, StrBuf *Target, StrBuf *CLineBuf, const char **Pos)
{
const char *Error, *pch, *pchs;
int rlen, len, retval = 0;
+#ifdef HAVE_OPENSSL
if (is_https) {
int ntries = 0;
if (StrLength(CLineBuf) > 0) {
return -1;
}
else
- return StrBufTCP_read_buffered_line(Target,
- CLineBuf,
- sock,
- 5,
- 1,
- &Error);
+#endif
+ return StrBufTCP_read_buffered_line_fast(Target,
+ CLineBuf,
+ Pos,
+ sock,
+ 5,
+ 1,
+ &Error);
}
char *mo = NULL;
#endif /* ENABLE_NLS */
char uds_listen_path[PATH_MAX]; /* listen on a unix domain socket? */
- const char *I18nDumpFile;
+ const char *I18nDumpFile = NULL;
WildFireInitBacktrace(argv[0], 2);
break;
case 'G':
DumpTemplateI18NStrings = 1;
- I18nDump = NewStrBufPlain(HKEY("int foo(void)\n{\n"));
+ I18nDump = NewStrBufPlain(HKEY("int templatestrings(void)\n{\n"));
I18nDumpFile = optarg;
break;
default:
#ifdef ENABLE_NLS
initialize_locales();
+
locale = setlocale(LC_ALL, "");
mo = malloc(strlen(webcitdir) + 20);
free(mo);
lprintf(9, "Text domain: %s\n", textdomain("webcit"));
lprintf(9, "Text domain Charset: %s\n", bind_textdomain_codeset("webcit","UTF8"));
- preset_locale();
#endif
if (DumpTemplateI18NStrings) {
FILE *fd;
StrBufAppendBufPlain(I18nDump, HKEY("}\n"), 0);
+ if (StrLength(I18nDump) < 50) {
+ lprintf(1, "********************************************************************************\n");
+ lprintf(1, "* No strings found in templates! are you shure they're there? *\n");
+ lprintf(1, "********************************************************************************\n");
+ return -1;
+ }
fd = fopen(I18nDumpFile, "w");
if (fd == NULL) {
- lprintf(1, "unable to open I18N dumpfile [%s]\n", I18nDumpFile);
+ lprintf(1, "********************************************************************************\n");
+ lprintf(1, "* unable to open I18N dumpfile [%s] *\n", I18nDumpFile);
+ lprintf(1, "********************************************************************************\n");
return -1;
}
fwrite(ChrPtr(I18nDump), 1, StrLength(I18nDump), fd);