X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fclient.cpp;h=216d86cd412c6d0ffa0e9ae3cd1d8593614887e5;hb=69bd803a3221bf02672431390e672b0510695254;hp=c5d3b91c8dd3e8bc7dc6a998c159399fc5cf8fb1;hpb=e9006f904c81ee0b9654d7046f0ceeec02b51478;p=oweals%2Fminetest.git diff --git a/src/client.cpp b/src/client.cpp index c5d3b91c8..216d86cd4 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -236,6 +236,7 @@ void * MediaFetchThread::Thread() i != m_file_requests.end(); i++) { curl = curl_easy_init(); assert(curl); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); curl_easy_setopt(curl, CURLOPT_URL, (m_remote_url + i->name).c_str()); curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); std::ostringstream stream; @@ -1899,6 +1900,20 @@ void Client::ProcessData(u8 *data, u32 datasize, u16 sender_peer_id) } inv->deSerialize(is); } + else if(command == TOCLIENT_SHOW_FORMSPEC) + { + std::string datastring((char*)&data[2], datasize-2); + std::istringstream is(datastring, std::ios_base::binary); + + std::string formspec = deSerializeLongString(is); + + ClientEvent event; + event.type = CE_SHOW_FORMSPEC; + // pointer is required as event is a struct only! + // adding a std:string to a struct isn't possible + event.show_formspec.formspec = new std::string(formspec); + m_client_event_queue.push_back(event); + } else { infostream<<"Client: Ignoring unknown command "