Ryo Iizuka / libMiMic

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Sun Oct 26 14:11:23 2014 +0000
Parent:
99:875f75e7e63e
Child:
101:5022828ace54
Commit message:
bugfix; M-Search response

Changed in this revision

core/net/upnp/NyLPC_cSsdpSocket.c Show annotated file Show diff for this revision Revisions of this file
--- a/core/net/upnp/NyLPC_cSsdpSocket.c	Sun Oct 26 10:19:05 2014 +0000
+++ b/core/net/upnp/NyLPC_cSsdpSocket.c	Sun Oct 26 14:11:23 2014 +0000
@@ -82,7 +82,7 @@
  * SERVER MessageHeaderの値
  * 40文字以内であること。
  */
-#define SERVER_MESSAGE_HEADER "MiMic/1.4;UPnP/1.0;MiMicUPnP/0.1"
+#define SERVER_MESSAGE_HEADER "MiMic/1.4 UPnP/1.0 MiMicUPnP/0.2"
 
 
 /**
@@ -423,10 +423,10 @@
 			}
 		}
 	}else if(strncmp(STR_UPNP_ROOT_DEVICE,header.result.st_str,15)==0){
-		//rootDeviceはdevice0
+		//rootDeviceはSTR_UPNP_ROOT_DEVICE
 		tx=allocMsearchResponeTx(
 			sock,header.result.st_str,
-			sock->ref_device_record[0]->udn,sock->ref_device_record[0]->device_type,
+			sock->ref_device_record[0]->udn,STR_UPNP_ROOT_DEVICE,
 			header.result.st_len,
 			&tx_len);
 		if(tx==NULL){
@@ -479,7 +479,7 @@
 	return NyLPC_TBool_FALSE;
 }
 
-#define SSDP_NOTIFY_INTERVAL 240*1000	//300*0.8*1000
+#define SSDP_NOTIFY_INTERVAL 150*1000	//300*0.5*1000
 #define FLAG_ORDER_START_SERVICE	0
 #define FLAG_ORDER_STOP_SERVICE		1
 #define FLAG_IS_SERVICE_RUNNING		2