File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ static M2MResource* m2m_get_res;
36
36
static M2MResource* m2m_put_res;
37
37
static M2MResource* m2m_post_res;
38
38
static M2MResource* m2m_deregister_res;
39
+ static SocketAddress sa;
39
40
40
41
EventQueue queue (32 * EVENTS_EVENT_SIZE);
41
42
Thread t;
@@ -139,8 +140,12 @@ int main(void)
139
140
printf (" NetworkInterface failed to connect with %d\n " , status);
140
141
return -1 ;
141
142
}
142
-
143
- printf (" Network initialized, connected with IP %s\n\n " , network->get_ip_address ());
143
+ status = network->get_ip_address (&sa);
144
+ if (status!=0 ) {
145
+ printf (" get_ip_address failed with %d\n " , status);
146
+ return -2 ;
147
+ }
148
+ printf (" Network initialized, connected with IP %s\n\n " , sa.get_ip_address ());
144
149
145
150
// Run developer flow
146
151
printf (" Start developer flow\n " );
You can’t perform that action at this time.
0 commit comments