@@ -135,7 +135,7 @@ static void send_got_ip(struct ClientData *data, tcpip_adapter_ip_info_t *info)
135135 term reply = port_heap_create_tuple2 (& heap , make_atom (data -> global , sta_got_ip_atom ), ip_info );
136136 send_term (& heap , data , reply );
137137 }
138- END_WITH_STACK_HEAP (heap );
138+ END_WITH_STACK_HEAP (heap , data -> global );
139139}
140140
141141static void send_sta_connected (struct ClientData * data )
@@ -147,7 +147,7 @@ static void send_sta_connected(struct ClientData *data)
147147 {
148148 send_term (& heap , data , make_atom (data -> global , sta_connected_atom ));
149149 }
150- END_WITH_STACK_HEAP (heap );
150+ END_WITH_STACK_HEAP (heap , data -> global );
151151}
152152
153153static void send_sta_disconnected (struct ClientData * data )
@@ -159,7 +159,7 @@ static void send_sta_disconnected(struct ClientData *data)
159159 {
160160 send_term (& heap , data , make_atom (data -> global , sta_disconnected_atom ));
161161 }
162- END_WITH_STACK_HEAP (heap );
162+ END_WITH_STACK_HEAP (heap , data -> global );
163163}
164164
165165static void send_ap_started (struct ClientData * data )
@@ -171,7 +171,7 @@ static void send_ap_started(struct ClientData *data)
171171 {
172172 send_term (& heap , data , make_atom (data -> global , ap_started_atom ));
173173 }
174- END_WITH_STACK_HEAP (heap );
174+ END_WITH_STACK_HEAP (heap , data -> global );
175175}
176176
177177static void send_atom_mac (struct ClientData * data , term atom , uint8_t * mac )
@@ -183,7 +183,7 @@ static void send_atom_mac(struct ClientData *data, term atom, uint8_t *mac)
183183 term reply = port_heap_create_tuple2 (& heap , atom , mac_term );
184184 send_term (& heap , data , reply );
185185 }
186- END_WITH_STACK_HEAP (heap );
186+ END_WITH_STACK_HEAP (heap , data -> global );
187187}
188188
189189static void send_ap_sta_connected (struct ClientData * data , uint8_t * mac )
@@ -208,7 +208,7 @@ static void send_ap_sta_ip_assigned(struct ClientData *data, esp_ip4_addr_t *ip)
208208 term reply = port_heap_create_tuple2 (& heap , make_atom (data -> global , ap_sta_ip_assigned_atom ), ip_term );
209209 send_term (& heap , data , reply );
210210 }
211- END_WITH_STACK_HEAP (heap );
211+ END_WITH_STACK_HEAP (heap , data -> global );
212212}
213213
214214static void send_sntp_sync (struct ClientData * data , struct timeval * tv )
@@ -222,7 +222,7 @@ static void send_sntp_sync(struct ClientData *data, struct timeval *tv)
222222 term reply = port_heap_create_tuple2 (& heap , make_atom (data -> global , sntp_sync_atom ), tv_tuple );
223223 send_term (& heap , data , reply );
224224 }
225- END_WITH_STACK_HEAP (heap );
225+ END_WITH_STACK_HEAP (heap , data -> global );
226226}
227227
228228#define UNLIKELY_NOT_ESP_OK (E ) UNLIKELY((E) != ESP_OK)
0 commit comments