aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2015-03-19 07:25:33 -0300
committerdequis <dx@dxzone.com.ar>2015-04-10 14:10:41 -0300
commit73b1a8ee4370e5dd59b21ac9cf98120682632c59 (patch)
tree9257b5c18ae2e9d7129c1fa3f02bdebbb8c86942
parent913a663a3e383c40c644a7d0a8c8aba9d417167c (diff)
get_rfc822_header: allow headers at the end of a string
-rw-r--r--lib/misc.c5
-rw-r--r--protocols/msn/ns.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/misc.c b/lib/misc.c
index 74e28bfb..c2a42c97 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -718,11 +718,6 @@ char *get_rfc822_header(const char *text, const char *header, int len)
i++;
}
- /* Make sure we're still inside the string */
- if (i >= len) {
- return(NULL);
- }
-
/* Copy the found data */
return(g_strndup(ret, text + i - ret));
}
diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c
index 4d98982a..a9236b07 100644
--- a/protocols/msn/ns.c
+++ b/protocols/msn/ns.c
@@ -303,6 +303,8 @@ int msn_ns_command(struct msn_data *handler, char **cmd, int num_parts)
strlen(resp), resp);
g_free(resp);
return st;
+ } else if (strcmp(cmd[0], "QRY") == 0) {
+ /* CONGRATULATIONS */
} else if (strcmp(cmd[0], "OUT") == 0) {
int allow_reconnect = TRUE;
@@ -326,6 +328,10 @@ int msn_ns_command(struct msn_data *handler, char **cmd, int num_parts)
if (num_parts >= 3) {
handler->msglen = atoi(cmd[2]);
}
+ } else if (strcmp(cmd[0], "PUT") == 0) {
+ if (num_parts >= 4) {
+ handler->msglen = atoi(cmd[3]);
+ }
} else if (strcmp(cmd[0], "QNG") == 0) {
ic->flags |= OPT_PONGED;
} else if (g_ascii_isdigit(cmd[0][0])) {