Top Mud Sites Forum Return to TopMudSites.com
Go Back   Top Mud Sites Forum > Mud Development and Administration > MUD Coding
Click here to Register

Reply
 
Thread Tools
Old 04-18-2019, 07:14 PM   #1
ThunderZ
New Member
 
Join Date: Feb 2013
Posts: 5
ThunderZ is on a distinguished road
Issue collecting input from blowtorch

I recently added Kavir's protocol handler to my MUD (based on SocketMUD) and for some odd reason ALL other clients work perfectly fine...except for BlowTorch(Android MUD client).

I can't figure out why but when you try to input anything into the mud from Blowtorch..Blowtorch ****s itself...freezes and eventually crashes and the phone must be rebooted or force close blowtorch.

From what I can tell it from the read_from_socket() function

What am I doing wrong? Help PLEASE! lol.

Edit: Specifically it seems to be an issue with the way im calling read() I think..


Last edited by ThunderZ : 04-18-2019 at 07:18 PM. Reason: edit
ThunderZ is offline   Reply With Quote
Old 05-07-2020, 02:59 PM   #2
Istarian
New Member
 
Join Date: May 2015
Posts: 3
Istarian is on a distinguished road
Re: Issue collecting input from blowtorch

How do you figure it's an error reading from the socket? Are you seeing that log string or perror call in a way that is unambiguously from the specific connection/socket that the Android (Blowtorch) client is connected to?

Tangentially, if you don't know why there's an absolute adjustment of 10 bytes you might want to figure that out.







Looks like you're actually using pread from unistd.h based on the format... or maybe it's the read POSIX call...

Presumably you're trying to read one byte at a time from the network socket into read_buf until you hit the end of a line and tracking total read bytes insize. Based on the pread documentation it looks like the second parameter should be a fixed number of bytes to read from the offset on... So I'm not sure what 'read_buf + size' is supposed to be; is it really supposed to change with the size and what value do you imagine 'read_buf' to have?

If it's the POSIX read call you mean I think maybe it should be:

because that second parameter is supposed to be a pointer to the buffer... My C is probably rusty though and pointer arithmetic..

Last edited by Istarian : 05-07-2020 at 03:05 PM.
Istarian is offline   Reply With Quote
Reply


Thread Tools


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

All times are GMT -4. The time now is 05:36 AM.


Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Style based on a design by Essilor
Copyright Top Mud Sites.com 2022