@@ -72,7 +72,6 @@ int _zero = 0;
7272int _initNetwork (const SceNetAdhocctlAdhocId * adhoc_id );
7373int _readHotspotConfig (void );
7474int _findHotspotConfigId (char * ssid );
75- const char * _readServerConfig (void );
7675void _readChatKeyphrases (const SceNetAdhocctlAdhocId * adhoc_id );
7776int _friendFinder (SceSize args , void * argp );
7877void _addFriend (SceNetAdhocctlConnectPacketS2C * packet );
@@ -154,20 +153,7 @@ int proNetAdhocctlInit(int stacksize, int prio, const SceNetAdhocctlAdhocId * ad
154153 // Minimum Stacksize (just to fake SCE behaviour)
155154 if (stacksize >= 3072 )
156155 {
157- if (_readHotspotConfig () != 0 )
158- {
159- printk ("%s: failed reading hotspot config\n" , __func__ );
160- return -1 ;
161- }
162-
163- // Get Server IP (String)
164- const char * ip = _readServerConfig ();
165-
166- if (ip == NULL )
167- {
168- printk ("%s: failed reading ip config\n" , __func__ );
169- return -1 ;
170- }
156+ _readHotspotConfig ();
171157
172158 if (_initNetwork (adhoc_id ) != 0 )
173159 {
@@ -462,13 +448,16 @@ int _readHotspotConfig(void)
462448 if (_hotspot != -1 ) printk ("Selected Hotspot: %s\n" , line );
463449
464450 // No Hotspot found
465- else printk ("Couldn 't find Hotspot: %s\n" , line );
451+ else printk ("warning: couldn 't find Hotspot: %s, falling back to default hotspot id 0 \n" , line );
466452
467453 // Close Configuration File
468454 sceIoClose (fd );
469455
470456 // Return Success
471457 if (_hotspot >= 0 ) return 0 ;
458+ }else {
459+ printk ("%s: warning: hotspot.txt missing, falling back to default hotspot id 0\n" , __func__ );
460+ _hotspot = 0 ;
472461 }
473462
474463 // Generic Error
@@ -506,35 +495,6 @@ int _findHotspotConfigId(char * ssid)
506495 return 0 ;
507496}
508497
509- /**
510- * Read Server IP
511- * @return IP != 0 on success or... 0
512- */
513- const char * _readServerConfig (void )
514- {
515- // Line Buffer
516- static char line [128 ];
517-
518- // Open Configuration File
519- int fd = sceIoOpen ("ms0:/seplugins/server.txt" , PSP_O_RDONLY , 0777 );
520-
521- // Opened Configuration File
522- if (fd >= 0 )
523- {
524- // Read Line
525- _readLine (fd , line , sizeof (line ));
526-
527- // Close Configuration File
528- sceIoClose (fd );
529-
530- // Return IP (String)
531- return line ;
532- }
533-
534- // Generic Error
535- return NULL ;
536- }
537-
538498/**
539499 * Read Line from File
540500 * @param fd File Descriptor to read line from
0 commit comments