diff --git a/not2osd b/not2osd index 7c875784902e454410f636494b4f48bd4fec6dd2..d26465e80cb918b80476fe9ee81ebaa248f79d83 100755 --- a/not2osd +++ b/not2osd @@ -73,8 +73,8 @@ class NotificationFetcher(dbus.service.Object): #print("body", body) #print("actions", actions) #print("expire_timeout", expire_timeout) - su = strip_tags((summary)).split("\n") - bo = strip_tags((body)).split("\n") + su = strip_tags(summary[0:300]).split("\n") + bo = strip_tags(body[0:500]).split("\n") for i in range(len(su)): if su[i]!="" and su[i][0]=='-': su[i] = ' '+su[i]; diff --git a/osdd-run b/osdd-run index 26d6d66a7b8b87b9db12957f09ea3d8759a593fb..5ce1ebc20462ba4b9515a4e1191378a2bf9efe9d 100755 --- a/osdd-run +++ b/osdd-run @@ -3,7 +3,7 @@ cd "$(dirname "$0")" killall osdd pkill -f not2osd -not2osd & +./not2osd & tmp=$(mktemp) echo "Xft.render: False" > $tmp XENVIRONMENT=$tmp \ diff --git a/osdd.c b/osdd.c index 0ffa5f49c2899bd13390e5bd965df9becce8bf02..f4e56b871a794027d34e0fae76624b720068163c 100644 --- a/osdd.c +++ b/osdd.c @@ -250,11 +250,12 @@ parse_msg(unsigned char *buf, int len) msg->alocated_data=line; bool is_output_set=0; - while (*line) + while (line && *line) { // The parser is destructive, but it does not do any harm, since we display each message only once. char *nl = strchr(line, '\n'); - *nl++ = 0; + if(nl) *nl++ = 0; + else fprintf(stderr,"MISSING END NL!\n"); char *key; char *val = strchr(line, ':');