n0la / rcon

Source RCON client for command line
BSD 2-Clause "Simplified" License
140 stars 18 forks source link

segfault when sending "exec server.cfg" #2

Closed OlliC closed 7 years ago

OlliC commented 7 years ago

Hi,

i tried to sent the command "exec server.cfg" to an Insurgency server. I have configured an .rconrc config file.

$ rcon -s ins1 exec server.cfg

(process:22411): GLib-CRITICAL **: g_byte_array_removerange: assertion 'index < array->len' failed Segmentation fault

Same with rcon -s ins1 "exec server.cfg" rcon -s ins1 'exec server.cfg'

n0la commented 7 years ago

I have fixed this issue in master, would you mind testing it again with the master branch?

OlliC commented 7 years ago

$ rcon -s ins1 exec server.cfg Peer: connection closed

Seems to work now. I can see the command being executed in the server logs.

n0la commented 7 years ago

Nice that it's working now. I also tested this on my insurgency server :-)

I am not quite sure why the server closes the RCON connection. I guess it reinitialises the RCON server part and thus drops all active connections.

n0la commented 7 years ago

Can this issue be closed then?

OlliC commented 7 years ago

Yes