--- ./src/ircp_server.c 2011-05-31 01:00:38.000000000 +0900
+++ ircp_server.c 2015-01-05 19:31:09.193008180 +0900
@@ -33,6 +33,27 @@
#define TRUE 1
#define FALSE 0
+/* added */
+static int UnicodeToChar(uint8_t *c, const uint8_t *uc, int size)
+{
+ int n;
+
+ if (uc == NULL || c == NULL)
+ return -1;
+
+ /* Make sure buffer is big enough! */
+ for (n = 0; uc[n*2+1] != 0; n++);
+
+ if (n >= size)
+ return -1;
+
+ for (n = 0; uc[n*2+1] != 0; n++)
+ c[n] = uc[n*2+1];
+ c[n] = 0;
+
+ return 0;
+}
+/* /added */
static void get_incoming_file_info(obex_t* handle, obex_object_t* object, ircp_server_t* srv);
//
@@ -201,7 +222,7 @@
switch(hi) {
case OBEX_HDR_NAME:
if( (name = malloc(hlen / 2))) {
- OBEX_UnicodeToChar(name, hv.bs, hlen);
+ UnicodeToChar(name, hv.bs, hlen);
}
break;
default:
@@ -270,7 +291,7 @@
case OBEX_HDR_NAME:
DEBUG(0, "hlen = %d\n", hlen);
if( (name = malloc(hlen / 2))) {
- OBEX_UnicodeToChar(name, hv.bs, hlen);
+ UnicodeToChar(name, hv.bs, hlen);
}
break;
case OBEX_HDR_LENGTH:
--- ./src/ircptray_main.c 2011-05-31 01:00:38.000000000 +0900
+++ ircptray_main.c 2015-01-05 19:14:43.034424172 +0900
@@ -248,14 +248,13 @@
notification = notify_notification_new (g_get_application_name(),
notify_msg,
- icon,
- NULL);
+ icon);
if (notification == NULL) {
g_warning("failed to setup notification");
return;
}
- notify_notification_attach_to_status_icon (notification, AppTrayIcon);
+ /*notify_notification_attach_to_status_icon (notification, AppTrayIcon);*/
if (!notify_notification_show (notification, NULL))
g_warning("failed to send notification");
@@ -277,11 +276,10 @@
notification = notify_notification_new (g_get_application_name(),
notify_msg,
- icon,
- NULL);
+ icon);
if (notification != NULL) {
- notify_notification_attach_to_status_icon (notification, AppTrayIcon);
+ /* notify_notification_attach_to_status_icon (notification, AppTrayIcon);*/
if (!notify_notification_show (notification, NULL))
g_warning("failed to send notification\n");
--- ./src/recvfile.c 2011-05-31 01:00:38.000000000 +0900
+++ recvfile.c 2015-01-05 19:15:26.951770009 +0900
@@ -255,8 +255,7 @@
n = notify_notification_new (title,
msg,
- MAIN_ICON,
- GTK_WIDGET(AppTrayIcon));
+ MAIN_ICON);
if (n != NULL) {
notify_notification_set_urgency(n, NOTIFY_URGENCY_NORMAL);